package com.cskaoyan.day31.work5;

import com.cskaoyan.day31.work5.Util.ProxyUtil;
import com.cskaoyan.day31.work5.bean.Student;
import com.cskaoyan.day31.work5.bean.Teacher;

public class Demo {
    public static void main(String[] args) {
        Student stu = new Student();
        Teacher tea = new Teacher();
        Student stuProxy =  ProxyUtil.getProxy(stu);
        Teacher teaProxy = ProxyUtil.getProxy(tea);
        stuProxy.eat("老乡鸡");
        System.out.println("-------------------------");
        teaProxy.teach();




    }
}
